import  request  from "../utils/request";

//查询

export const queryEmpApi = (name,gender,begin,end,page,pageSize) =>{
  return request.get(`/emps?name=${name}&gender=${gender}&begin=${begin}&end=${end}&page=${page}&pageSize=${pageSize}`)
}

//添加
export const addEmpApi = (emp) =>{
  return request.post('/emps',emp)
}

//查询回显
export const queryByIdApi = (id) =>{
  return request.get(`/emps/${id}`);
}

//修改
export const updateEmpApi = (emp) =>{
  return request.put('/emps',emp)
}

//删除

export const deleteEmpByIds = (ids) =>{
  return request.delete(`/emps?ids=${ids}`)
}

//查询全部员工
export const queryAllEmpApi = () =>{
  return request.get(`/emps/list`);
}


